<script setup lang="ts">
import { RouterView, useRoute } from 'vue-router'
import NavigationView from '@/views/NavigationView.vue'
import { computed } from 'vue'

// 获取当前路由对象
const route = useRoute()

// 定义不需要显示导航栏的路由路径（支持路径或正则）
const noNavRoutes = ['/login2', '/register2', '/login3', '/merchant', '/admin']

// 计算是否展示导航栏
const showNavigation = computed(() => !noNavRoutes.includes(route.path))
</script>

<template>
  <!-- 仅当不是某些页面时才显示导航栏 -->
  <NavigationView v-if="showNavigation" />
  <RouterView />
</template>

